Engine ignition timing with knock control by combustion pressure harmonic amplitude ratio

ABSTRACT

An ignition timing control for an internal combustion engine subjects a combustion pressure signal to multiple switched capacitor bandpass filters with frequencies controlled in phase lock loop from engine speed to generate harmonic wave signals at frequencies which are constant multiples of the varying firing frequency. The phase difference between the peaks of two harmonics such as the second and fourth is used to control ignition timing to a phase difference of zero, in some cases with ignition pulses referenced to the detected peak of the first harmonic (fundamental) rather than a detected crankshaft position. The ratio of peak amplitudes between two harmonics such as the first and fourth is used to control dilution by EGR or variable valve lift to a predetermined ratio and may also be used to retard ignition timing from the normal timing to reduce knock. The ratio of the peak amplitude of subharmonics to the fundamental may be used as a roughness or driveability sensor.

BACKGROUND OF THE INVENTION

This invention relates to the control of an internal combustion enginein response to combustion pressure and particularly to the control ofengine ignition timing for the reduction of engine knock.

The development of piezoelectric pressure sensors suitable forcombustion pressure sensing and microcomputers suitable for internalengine control has created a great deal of interest in engine control inresponse to combustion pressure, since it is recognized that a greatdeal of useful information about the combustion process is derivablefrom the combustion pressure curve.

One approach to the analysis of a combustion pressure curve is theexamination of its harmonics. An approximation of a typical combustionpressure waveform and its harmonics at the engine firing frequency,twice this frequency and four times this frequency are shown FIGS. 5b,5c, 5d and 5e, respectively. I have certain relationships between theseharmonics that show promise in engine control. One such relationshipinvolves the amplitude ratio of corresponding peaks of two differentharmonics of the combustion pressure curve. The amplitude ratio of ahigher harmonic such as the fourth, at four times the fundamentalfrequency, to the first harmonic, at the fundamental frequency, tends todecrease with a slower burn and increase with a faster burn or withknock. In my U.S. Pat. No. 4,699,107, issued Oct. 13, 1987, I describedan engine dilution control based on this amplitude ratio. In my U.S.Pat. No. 4,699,105, also issued on Oct. 13, 1987, I disclosed thecontrol of engine ignition timing for MBT in response to the phasedifference between corresponding peaks of two harmonics in thecombustion pressure waveform. In this patent, I deal with ignitiontiming retard to prevent knock in response to the amplitude ratio of twoharmonics in the combustion pressure waveform.

SUMMARY OF THE INVENTION

The invention may be summarized as an ignition timing control for aninternal combustion engine in which the ignition timing is selectivelyretarded from a normal timing in response to a signal derived from theamplitude ratio of two harmonics in the combustion pressure waveform. Inparticular, a high amplitude ratio may be used to trigger such retard,especially if the engine has a dilution gas control which is effectiveto increase dilution gas in the combustion charge in response to a highamplitude ratio but cannot always bring a high amplitude ratio back tothe desired value within the authority limit of the dilution gascontrol. A sharp increase in the amplitude ratio of the two harmonics isalso indicative of engine knock. Therefore, alternatively, the ignitiontiming may be retarded in response to a high rate of increase in theamplitude ratio.

The invention may particularly use switched capacitor filters set up ashigh Q bandpass filters with a passband and center frequency controlledthrough phase lock loop techniques to follow crankshaft rotationalspeed. Two particular harmonics found to be useful for knock control ina four cylinder engine are the fourth harmonic and the first subharmonicof the engine firing frequency, with the ratio being that of either tothe fundamental harmonic. It is further found that this system, oncestarted, will run without an accurate crankshaft position reference ifignition timing is referenced to the detected peak of the first harmonicor fundamental engine firing frequency.

Further details and advantages will be apparent from the accompanyingdrawings and following description of a preferred embodiment.

SUMMARY OF THE DRAWINGS

FIG. 1 is a block diagram of an internal combustion engine with acontrol according to the invention.

FIG. 2 is a block diagram of a PLL clock generator for use in thecontrol of FIG. 1.

FIG. 3 is a diagram of a sample and hold circuit for use in the controlof FIG. 1.

FIG. 4 is a diagram of a peak detect circuit for use in the control ofFIG. 1.

FIGS. 5a-5m are time waveforms useful in understanding the operation ofthe control of FIG. 1.

FIG. 6 is a flow chart describing the operation of the computer used inthe control of FIG. 1.

DESCRIPTION OF A PREFERRED EMBODIMENT

Referring to FIG. 1, an internal combustion engine 10, understood to bethe driving engine for a motor vehicle, includes intake apparatus 11 andexhaust apparatus 12 of normal construction and operation. Intakeapparatus 12 is understood to include a standard air cleaner, fuel/airmixing system such as a carburetor or fuel injection system, an intakemanifold and intake valves for the combustion chambers, along with thevalve drive train necessary for their proper operation. The fuel/airmixing system may be of the well known closed loop stoichiometric typeincluding an oxygen sensor in the exhaust with a feedback control, thelean burn type in which a lean fuel/air mixture is maintained or anyother suitable type. Exhaust apparatus 12 includes the standard exhaustvalves and valve train, exhaust pipe and muffler, as well as anynecessary exhaust sensor for fuel control.

Engine 10 also includes diluent control, which may be in the form of anelectrically controllable EGR valve 13 effective to control the flow ofexhaust diluent through a return pipe 15 from exhaust apparatus 12 tointake apparatus 11. EGR valve 13 may be a vacuum operated valve withpulse width modulation electrical control, a stepper motor operatedvalve or any other known electrically controlled valve. Alternatively,the diluent control may be in the form of an adjustable intake valvemechanism which controls the degree of intake valve lift, whereupon thevalve overlap and thus the residual exhaust gas left in the combustionchamber is varied in response to a control signal. Such a mechanism isshown in U.S. Pat. application Ser. No. 834,791 filed Feb. 28, 1986 byDuane J. Bonvallet and assigned to the assignee of this application.

Engine 10 further includes ignition apparatus 16 of the normal computercontrolled spark ignition type, such as that described in U.S. Pat. No.4,231,091 to Motz, issued Oct. 28, 1980 or its equivalent. The ignitionapparatus may include the normal distributor, spark plugs, spark coiland computer apparatus for generating pulses at the appropriate timesfor firing the spark plugs. In addition, such apparatus includes meansfor generating reference pulses at predetermined crankshaft angles asthe crankshaft rotates in engine operation, such as those shown in FIG.5a. These pulses are not only useful as reference pulses for ignitiontiming, but also provide an engine speed signal, since their frequencyof occurrence is proportional to engine rotational speed. Preferably, inthis embodiment, the ignition and RPM apparatus 16 includes a toothedwheel having at least six equispaced teeth around its periphery and afixed electromagnetic, optic or other sensor adapted to generate anelectric voltage pulse at the passing of each tooth. Thus a pulse isgenerated every sixty degrees of crankshaft rotation at ten degrees BTDCfor a total of three teeth per firing for a four cylinder engine. Theremay be a seventh tooth adjacent one of the other six to identify aparticular combustion chamber. For the system of this invention, theabsolute relationship between the pulses and actual top dead center ofcrankshaft position need not be exact, since ignition timing is closedloop, but the angles between teeth should be substantially equal foraccurate engine speed measurement.

Engine 10 includes combustion pressure sensors 20, which may be of thetype shown in U.S. Pat. No. 4,491,010 to Brandt et al, issued Jan. 1,1985 or its equivalent. The Brandt et al pressure sensor comprises aheadbolt with a head adapted to be stressed by distortions in the headof engine 10 produced by the combustion pressure in the cylinders andhaving a piezoelectric element adapted to generate an electrical signalindicative of the changing combustion pressure. For a four cylinderengine, two such sensors 20, one placed between two of the cylinders andthe other placed between the other two cylinders, may be sufficient tosense the combustion pressure of all four cylinders, although more mayalso be used if necessary to obtain pressure signals from all combustionchambers.

The output signals from sensors 20, which are generally shown in FIG.5b, are provided through normal charge amplifiers 21 to a summingjunction 22. The summed signal is amplified in an AGC amplifier 23, thegain of which is controlled in a manner to be described. Automatic gaincontrol is preferred because of the wide dynamic range of the signalsfrom sensors 20. Since the information to be used from the signals is inthe form of phase differences and amplitude ratios of harmonics of thepressure signal, the use of AGC does not affect the information in thesignals adversely. The gain controlled signal from the output ofamplifier 23 is provided through scaling amplifiers 25, 26 and 27 tobandpass filters 30, 31 and 32, respectively. Care must be taken withthe amplifiers and summing junction circuitry to prevent non-linearityor narrow bandwidth from introducing phase shift into the signal, sincephase differences in the harmonics are used to control ignition timing.In particular, there should be no diodes in the summing junction; andthe amplifiers should have a flat bandwidth from the lowest harmonic(which might be the firing frequency or might be as low as 1/4 thefiring frequency for some applications using subharmonics) at the lowestexpected engine speed to the highest harmonic at the highest expectedengine speed. A typical bandwidth might be from approximately 0.5 Hz toseveral kHz.

Bandpass filter 30 is tuned, in a manner to be described, to the firingfrequency of engine 10; bandpass filters 31 are tuned to higherharmonics of the firing frequency. In this embodiment, filter 31 istuned to the second harmonic, X2 or double the firing frequency; andbandpass filter 32 is tuned to the fourth harmonic, X4 or four times thefiring frequency. Scaling amplifiers 25, 26 and 27 are used to adjustthe relative amplitudes of the harmonic signals to the same order ofmagnitude for signal processing and are of constant predetermined gain.Filters 30, 31 and 32 are of the switched capacitor type (mf10), withaccompanying components as specified by the mf10 specification sheets toproduce a relatively sharply tuned (Q=20) bandpass filter with variablecenter frequency. The outputs of filters 30, 31 and 32 are shown as thesine waves of FIGS. 5c, 5d and 5e, respectively.

A PLL clock generator 35 controls the tuned frequencies of filters 30,31 and 32 continuously and simultaneously in response to signals from acomputer 36, which receives engine speed signals from the RPM indicatingpulses generated in ignition apparatus 16 or, alternatively, some otherRPM indicator such as a toothed flywheel. It has been found that a sixtoothed wheel as described above provides sufficient resolution for theRPM signal. Computer 36 monitors the rotational speed of engine 10 andcontrols the bandpass filters 30, 31 and 32 to follow the firingfrequency of engine 10 (which is proportional to the RPM) and its X2 andX4 harmonics. Computer 36 may be of the computer on a chip typeexemplified by the 68HC11 microcomputer found in the VMS-46 (T) dual68HC11 single chip module controller system available from AdvancedElectronics Diagnostics, Inc. and will be described with more detail inconnection with the flow chart of FIG. 6 and at other points throughoutthis description.

The outputs of bandpass filters 30, 31 and 32 are provided to peakdetect apparatus 37 and the sample inputs of sample and hold apparatus38. Peak detect apparatus 37 determines and generates a pulse at thepeak of each of the X1, X2 and X4 signals and provides the pulses forthe X2 and X4 harmonics (X2DET and X4DET) to input capture inputs ofcomputer 36. In addition, it provides the pulses for all three signalsto the trigger inputs of sample and hold apparatus 38, whereby the peakamplitudes of the three signals (X1MAX, X2MAX and X4MAX) are sampled andprovided to A/D inputs of computer 36. Finally, the maximum sampled peakamplitude is also provided to an AGC control 40, which generates the AGCcontrol signal for AGC amplifier 23. Computer 36 is programmed tocompare the timing and amplitudes of the peaks as provided by apparatus37 and 38, to calculate therefrom output control signals for EGR valve13 and ignition timing apparatus 16 and to provide those output controlsignals to the appropriate apparatus.

PLL clock generator 35 is described in more detail with reference toFIG. 2. A crystal controlled oscillator 45 generates a high frequencysuch as 256 KHz to be divided in divider 46 down to 100 Hz, whichrepresents the smallest frequency step for the output of PLL clockgenerator 35 and corresponds to a smallest frequency step in filters 30,31 and 32 of less than 1 Hz. If a different frequency step is desired,it can be obtained by reprogramming divider 46. The 100 Hz signal fromdivider 46 is provided to the input of PLL chip 47 (4046). PLL chip 47,which acts as a frequency multiplier, contains an internal oscillatorwhich outputs a higher frequency signal, which is fed back through acounter 48 to another input of PLL chip 47. Each pulse from the outputof PLL chip 47 is counted by counter 48 until the loaded contents ofcounter 48 are reduced to zero and an output pulse is sent to PLL chip47. The time of occurrence of this pulse is compared with the next pulseof the 100 Hz signal to adjust the internal oscillator of the PLL chipand maintain the proper output frequency as determined by the loadedcount of counter 48 in phase lock loop operation. The count of counter48 is obtained from computer 36 through parallel output lines as shown.Computer 36 determines the count from the monitored rotational speed ofengine 10 by timing between consecutive speed signal input pulses anddividing the time interval into a constant. Thus, the output frequencyof PLL chip 47 is maintained proportional to the firing frequency ofengine 10, with a typical value of 100 KHz at 1000 RPM. This output isprovided to a divider 50, which provides outputs proportional to thefiring frequency, the X2 frequency and the X4 frequency for applicationto the switched capacitor bandpass filters 30, 31 and 32, which filterscenter frequency and pass band thus follows the firing frequency ofengine 10.

There are actually two outputs from each of bandpass filters 30, 31 and32: the normal output and another output from the "cosine" output pin ofthe switched capacitor filter chips. Since the normal output is a sinewave and the cosine output is a cosine wave of the same frequency, thelatter is the time derivative of the former; and the peak of the formercan be identified by the "zero" crossing of the latter. However, peakdetection is not quite so simple, since there are both positive andnegative peaks, there are several peaks of a higher harmonic for eachpeak of a lower harmonic, and the peaks of different harmonics are notnecessarily in phase with each other. It is desirable to obtain thepeaks of the higher harmonic signals that most closely correspond withthe peaks of the fundamental signal and with each other. Thus, the peakdetect circuit must be adapted to the particular harmonics of thesystem. In this system, the X1 (fundamental), X2 and X4 harmonics areall peak detected.

The peak detect circuit is shown in FIG. 4. The normal signal X1 fromfilter 30 is provided through a capacitor 52 to the non-inverting inputof a zero detect comparator 53 having a tie-up resistor 55 to thevoltage source V and an inverting input connected to the reference"zero" level V/2 and through a resistor 56 to the non-inverting input.The output is a square wave X1Z which goes high when the sine wave inputgoes up through zero and goes low when the sine wave input goes downthrough zero. Similar circuits are provided for the cosine signal C1from filter 30 (producing output C1Z) and the similar signals fromfilters 31 (X2, C2) and 32 (X4, C4), although they are not shown in FIG.4. The applications of their outputs are shown as inputs to elements ofthe circuit.

The output of comparator 53, signal X1Z, is provided to the D input of aflip-flop 57 having a C (clock) input receiving signal C1Z. Theflip-flop is "armed" with a high D input when the fundamental frequencysignal goes positive, so that its Q output goes high along with the Cinput when the cosine signal from filter 30 goes high, which is at thepeak of the sine signal from filter 30. Thus the Q output of flip-flop57, which comprises the X1DET signal provided to sample and hold circuit38, goes high with the positive peak of the X1 signal, as seen in FIG.5f.

Signal X1Z is also provided to the D input of flip-flop 58 having a Cinput provided with signal X2Z. The Q output of flip-flop 58 is providedto the D input of a flip-flop 60 having a C input receiving signal C2Z.Flip-flop 58 generates an X2 window (X2W) to arm flip-flop 60 during thefirst positive half cycle of X2 after the start of the positive halfcycle of X1, as seen in FIG. 5g. Thus, flip-flop 60 will generate theoutput X2DET at the maximum of X2 closest to the maximum of X1, as shownin FIG. 5h.

Signal X4Z is provided to the C input of a flip-flop 61 having a D inputconnected to the Q output of flip-flop 58. The Q output of flip-flop 61is connected to the D input of a flip-flop 62. The Q output of flip-flop61 generates an X4 window (X4W) with the first positive half cycle of X4following the beginning of the X2 window, as shown in FIG. 5j. Flip-flop62 has a C input receiving signal C4Z and an output providing the signalX4DET as X4 reaches its first positive peak within the X4 window, asseen in FIG. 5k. It should be noted that the logic described in thisparagraph for X4DET will not catch the correct peak if X4 becomes soadvanced with respect to X2 that the desired positive half cycle of X4begins before the desired positive half cycle of X2. However, this isnot expected to be a problem, since X4 does not become this far advancedwith respect to X2 in normal operation of the engine. If it did occur,the derived phase difference between X2 and X4 would become so largethat it would be easy to detect in software comparison withpredetermined limits and ignore. However, if desired, the circuit ofFIG. 4 could be modified by the addition of another flip-flop having a Dinput receiving X2Z, a C input receiving X4Z and a Q output ORed withthe Q output of flip-flop 61 at the D input to flip-flop 62. This wouldcreate the X4 window when the later of X2 and X4 began its positive halfcycle within the positive half cycle of X1, no matter which of X2 and X4started first.

An additional flip-flop 63 receives signal X1Z on its D input and signalX4Z on its C input. The output of flip-flop 63 is a RESET signal, shownin FIG. 5m, connected to the R (reset) input of flip-flop 57 to reset itfor the next X1 peak detect with the first upward X4 zero crossing inthe negative half cycle of X1. This function is not necessary for the X2and X4 peak detect flip-flops since there are multiple upward zerocrossings of the higher harmonics for each such crossing of X1 and theythus reset themselves by means of the C and D inputs before the nextpeak detect.

Thus the closest corresponding peaks of X1, X2 and X4 are detected andcomputer 36 notified of at least the X2 and X4 peaks, whereupon computer36 notes the time of each from an internal real time clock. In addition,the X2 window signal from the Q output of flip-flop 58 is separatelyprovided to computer 36 and sample and hold circuit 38 for uses to bedescribed.

A portion of sample and hold circuit 38 is shown in FIG. 3. FET 70 isused as a switch to connect signal voltage X1 to a capacitor 71,connected to ground, when FET 70 is turned on by a one shot 72. One shot72 is triggered by the peak signal X1DET. During the on period of oneshot 72 and FET 70, capacitor 71 charges or discharges through FET 70 tothe level of X1. A buffer amplifier 73 provides the sampled peak valueof X1: X1MAX with minimal charge leakage from capacitor 71. It furtherconnects capacitor 71 through a diode 75 to a junction 76 having similarconnections through diodes 77 and 78 from similar circuits generatingX2MAX and X4MAX. These circuits are not shown, since they are identicalto the circuit for X1MAX. The diode connections to junction 76 provide a"highest wins" configuration. Junction 76 is connected through anotherFET 80 to a capacitor 81 connected to ground. FET 80 is turned on by oneshot 82, which is triggered by the downward or trailing edge of the X2Wwindow voltage from peak detect circuit 37 previously described. Duringthe period that FET 80 is turned on, the voltage on junction 76, whichis the highest of X1MAX, X2MAX and X3MAX, is transferred to capacitor81. The voltage on capacitor 81 is provided to AGC control circuit 40through a buffer amplifier 83. AGC control circuit 40 may includestandard proportional plus integral control circuitry for processing thevoltage for application to the gain control input of amplifier 23 inFIG. 1.

Computer 36 is controlled by a stored internal program which will bedescribed with reference to the flow chart of FIG. 6. It is assumed thatcomputer 36 includes input capture which automatically responds topulses on a plurality of input lines assigned to receive pulses from theRPM sensor included in the ignition and RPM apparatus 16 and the peakdetect pulses X2DET and X4DET: to read the time of such pulses on aninternal real time clock, store a number of each said time in anassigned input register and set an appropriate flag to indicate theevent. Such a flag, once set, prevents further capture of that inputuntil the flag is cleared by the program. In addition, the window signalX2W is provided to a digital input port of computer 36. It should bekept in mind that there will be only one RPM pulse every sixty degreesof engine crankshaft rotation (unless there is a seventh tooth) and onlyone X2DET and X4DET pulse per combustion chamber firing. Therefore,there will be sufficient time for the control program charted in FIG. 6to read the process the captured inputs in its normal operation, withoutthe use of a special interrupt routine, and still have time to clear theflag before the next input is expected.

The basic outline of the control program is shown with reference to FIG.6, with obvious and particular computer dependent housekeeping tasksomitted. It begins by determining, at decision point 100 if the RPM flagis set. If so, an RPM pulse has been received; and it is time todetermine the time elapsed since the last RPM pulse in order tocalculate a speed number RPMOUT for output to PLL clock generator 35. Anew period is calculated at step 101 by subtracting OLDTIME, the time ofthe last previously received RPM pulse, from NEWTIME, the time of thepulse just received. The old, or last calculated period has also beensaved; and if the new period is less than 1/4 of the old period atdecision point 102, the new period is considered invalid, since itrepresents an impossible acceleration of the engine. The routine thusskips the next step 103. Otherwise, the RPMOUT value is calculated instep 103 before the RPM flag is cleared in step 104. The RPM is alsocleared in step 104 if step 103 is skipped, since the new reading is notwanted. The determination of decision point 102 is primarily includedfor the case of a 7 toothed wheel in the RPM generator. Since theseventh tooth is closely adjacent one of the other six teeth, the periodbetween them will be very short compared with the normal period betweenany of the other 6 teeth; and the pulse from the seventh tooth will thusbe identified and ignored by the routine. The calculation of RPMOUT isaccomplished by dividing the new period into a constant to invert unitsfrom [time/angle] to [angle/time] and properly scale the number foroutput to PLL clock generator 35.

After step 104, computer 36 checks the X2W window input to determine, atdecision point 105, if the window is open: that is, if the window signalis high as shown in FIG. 5g. If not, the computer clears the X2 and X4flags before returning to the start. If so, the computer checks the X2and X4 flags at decision point 107 to determine if they are both set. Ifthey are not both set, there is insufficient information forcalculations; and the computer returns to the start. However, if theyare both set, it is time to calculate the engine control values andoutput them to the respective controls. It may be possible, due to theeffect of noise or some other minor error, for the engine to go entirelythrough the window open period without receiving one of the X2DET orX4DET signals. In this case, no calculations will be performed duringthe firing of that combustion chamber, since the X2 and X4 flags are notboth set. It is in order to clear the X2 and X4 flags in thatcircumstance that step 106 is included, so that both input lines will becleared at the end of the window open period for new signals during thenext firing. Otherwise the clearing of the X2 and X4 flags would be morenaturally placed after the calculations. There is no need for it afterthe calculations in this embodiment, however, since the clearing willtake place after the end of the X2W window.

The ignition timing and EGR values are calculated in step 108, whichactually represents one or more subroutines to be called. The ignitiontiming value is determined from the phase difference between two of theharmonic peaks: in this embodiment, the difference in time between X2DETand X4DET. The difference in the stored times of these events iscalculated. The sign of this difference determines if ignition timing isto be advanced or retarded: it is to be advanced if X4DET occurs firstand vice versa. The absolute value of the difference is converted tocrankshaft angle with a multiplication by a number representing RPM; andthe result determines the amount of correction, as modified by filterfunctions to be described.

The EGR value is determined from the ratio of the maximum value of oneof the higher harmonics to that of another harmonic, particularly to thefundamental: in this embodiment X4MAX divided by X1MAX. The ratio iscompared to a desired reference value to determine both the directionand amount of correction. EGR is to be increased if the value of X4MAXis too large compared to that of X1MAX and vice versa, with thedifference in ratios determining the amount, as modified by the filterfunctions to be described.

When the ignition timing control is provided with knock controlaccording to this invention, the preceding description of block 108 ismodified slightly. The ignition timing derived from the phase differencebetween X2DET and X4DET is considered the normal ignition timing forMBT, and the actual ignition timing conforms to this value when no knockis sensed. However, a retard from the normal value is derived from theamplitude ratio of X4MAX divided by X1MAX. In one embodiment, when thisratio exceeds a reference which may be different or the same as that forEGR control, the actual ignition timing is retarded from the normalignition timing. If the engine uses the EGR control described herein,the ignition timing may be unused until the EGR or dilution gas controlreaches its authority limit with the ratio still exceeding a desiredreference value. The invention may also be used as a "stand alone" knockcontrol. In this case, the normal ignition timing would be thatdetermined by any known ignition timing system. Another arrangement,with or without the EGR control, is to retard ignition timing from thenormal timing whenever the rate of increase of the ratio exceeds areference, since a sharp increase in the ratio appears to definitelyindicate knock. In addition, it appears that simultaneous high valuesfor the ratio of one of the higher harmonics such as the fourth to thefirst harmonic and the ratio of the first subharmonic to the firstharmonic indicates knock. Subharmonics of the combustion pressurewaveform are further discussed at a later point in this description. Inany case, the retard may be of a single step or varying with the amountby which the ratio derived value exceeds the relevant reference. It maybe withdrawn gradually when knock is no longer indicated, for smoothersystem operation. It may or may not be subjected to the same filteringas the normal ignition timing and EGR correction as described below.

The values for ignition timing and EGR correction may be subjected towhatever filtering may seem appropriate; however, in this embodiment,there are two such functions. The first is a first order digital lowpass filter function of the form VAVG_(new) =VAVG_(old) +1/n₁ (V_(new)-VAVG_(old)). In this well known function, a filtered value VAVG isperiodically updated by adding to the last value thereof a fraction ofthe difference between the latest input V_(new) and the old filteredvalue VAVG_(old), the fraction being determined by the constant n₁. Theupdating, in this embodiment, may occur at the general rate of onceduring each combustion chamber firing; and step 109, just after thecalculations of step 108, is a convenient time for it.

The other filter function of step 109 is an integral plus proportionalfunction of the form CORRECTION=INTEGRAL FACTOR+PROPORTIONALFACTOR+OFFSET. The programming of this function will be well known tothose skilled in controls; and its calibration will depend on the typeof engine and variation of the control desired.

Once the output values have been computed, they may be output to theignition and EGR controls in step 110. A portion of these controls maybe included as additional programming in computer 36; but the mechanicsof programming to generate an ignition pulse at the proper time inreference to a crankshaft reference pulse or to output a control signalto an EGR valve are well known and described in the prior art. Onepossibility of this system not known in the prior art, however, is thatof dispensing entirely with the crankshaft reference pulses, excepttemporarily during starting, and running closed loop ignition timingwith reference to the peak timing X1DET of the fundamental signal. Inthe otherwise normal ignition timing, wherein the ignition pulse isgenerated a determined crankshaft angle after a reference crankshaftpulse, the rise of the X1DET signal, which indicates the positive peakof the combustion pressure fundamental frequency waveform, is used inplace of the crankshaft reference pulse. This means that there does nothave to be an accurately known relationship between the pulses generatedin the ignition and RPM apparatus 16 and absolute crankshaft position.Not having to maintain this accuracy in absolute crankshaft position hasthe potential for cost savings in engine and control design. During theshort period of engine starting before the loop is closed, the enginemay use the crankshaft reference pulses to get started, even though theyare not especially accurately related to absolute crankshaft position.As soon as the loop is closed, the ignition timing will become moreaccurate through the feedback.

In a modification of the apparatus shown in FIG. 1, an engine roughnessor driveability sensor is created. Additional switched capacitorbandpass filters similar to filters 30, 31 and 32 are added to produceselected subharmonics of the engine firing frequency. This is based onthe fact that these subharmonics appear to be associated with differentcylinders missing or firing weakly compared to the others. For example,a four or eight cylinder engine might include filters for 1/4, 1/2and/or 3/4 the firing frequency, since individual cylinders fire at arate one fourth the total firing rate. A six cylinder engine mightinclude filters at 1/3 and/or 2/3 the firing frequency, since individualcylinders fire at a rate one sixth the total firing rate. Each isprovided with its own input scaling amplifier similar to amplifier 25and its own output lines to peak detect apparatus 37 and sample and holdapparatus 38. It is not necessary to coordinate the peak detection ofthese signals to specific peaks of the other signals, since only theirpeak amplitudes will be used. Therefore any peak reading apparatus maybe used, with output supplied to computer 36. The relative peakamplitudes of these signals are compared with that of the fundamentalsignal (X1MAX). If any of them are significantly greater, compared toX1MAX, than they should be, according to predetermined reference ratios,a misfire or roughness signal is generated. It may be possible toidentify the specific missing or weakly firing cylinders fromidentification of the specific signals whose peaks are too large. Thedilution control may be made responsive to the ratio of the harmonic tothe fundamental which exceeds by the greatest percentage its desiredlevel in closed loop to maintain driveability. In addition, if themisfiring cylinder can be identified, an adjustment to the air/fuelratio of that cylinder could be made to bring it back in line with thecorrectly firing cylinders. The AGC control may be made responsive tothese signals as well as the others described above. The specificapparatus and connections required for the preceding should be obviousto one skilled in the art in view of the rest of the precedingdescription.

The embodiments of the invention in which an exclusive property orprivilege is claimed are defined as follows:
 1. An ignition timingcontrol for an internal combustion engine including a combustionchamber, means effective to ignite a combustible charge in thecombustion chamber and power output apparatus including a rotatingcrankshaft driven in response to the expansion of the ignitedcombustible charge, the ignition timing control comprising, incombination:means effective to define a normal ignition timing for theengine in the absence of knock; pressure sensing means effective tosense the pressure in the combustion chamber and generate a combustionpressure signal therefrom; means effective to sense the rotational speedof the crankshaft; frequency selective filter means for generating aplurality of predetermined harmonic signals of the combustion pressuresignal, the frequency selective filter means being responsive to thelast means to maintain the frequencies of the harmonic signals at wholenumber multiples of the firing frequency of the engine as the rotationalspeed of the crankshaft changes; means effective to detect the relativepeak amplitudes of corresponding peaks in a first predetermined pair ofthe harmonic signals and determine the ratio thereof; and means forselectively retarding the ignition timing of the engine from the normalignition timing in response to the ratio.
 2. The ignition timing controlof claim 1 wherein the ignition timing is retarded from the normaltiming when the ratio exceeds a first predetermined reference.
 3. Theignition timing control of claim 1 wherein the ignition timing isretarded from the normal timing when the ratio increases at a rateexceeding a second predetermined reference.
 4. The ignition timingcontrol of claim 1 wherein the means effective to define a normalignition timing for the engine in the absence of knock comprises, incombination:means effective to detect the times of corresponding peaksin a second predetermined pair of the harmonic signals and determine thedifference therebetween; and means for varying the ignition timing ofthe engine to reduce the difference to zero in closed loop operation. 5.The ignition timing control of claim 4 in which:the means effective tosense the rotational speed of the crankshaft comprises frequencymultiplying means for generating a pulsating signal at a frequencyproportional to the rotational speed of the crankshaft; the frequencyselective filter means comprises a plurality of switched capacitorfilters clocked by the pulsating signal to maintain narrow passbands atwhole number multiples of the engine firing frequency and generatingfrom the combustion pressure signal sine and cosine wave harmonicsthereof; and the means effective to detect the times of correspondingpeaks uses the zero crossing of the cosine wave harmonic to identify thepeak of the corresponding sine wave harmonic.
 6. The ignition timingcontrol of claim 1 further comprising apparatus of limited authorityeffective to control the admission of dilution gasses to the combustiblecharge, means effective to vary the dilution control apparatus tomaintain the ratio of the two predetermined harmonic signals at or belowa predetermined dilution reference within the authority limit of theapparatus, the ignition timing control retarding the ignition timing ofthe engine from the normal timing when the ratio of the twopredetermined harmonic signals exceeds the predetermined dilutionreference with with the apparatus at the limit of its authority indilution increase.